package com.a;

import javax.naming.PartialResultException;

public class e {
    public static void main(String[] args) {

        int[] arr1={11,22,33,44,55};
        a(arr1);
        int[] arr2=null;

        a(arr2);

        int[] arr3={};

        a(arr3);

    }
    public static void a(int[]arr)
    {

        if(arr==null)
        {
            System.out.println("arr为null");
            return;
        }

        System.out.println("[");
        for (int i=0;i<arr.length;i++)
        {
        /*    if(i<arr.length-1)
            System.out.println(arr[i]+",");
            else
                System.out.println(arr[i]);*/

            System.out.println(i==arr.length-1?arr[i]:arr[i]+",");
        }
        System.out.println("]");

    }

}
